l114/h11 uitleg.php
<?php
$naam = $_GET['voornaam']
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form method='get' action=''>
Voornaam <input type="text" name="voornaam" value="<?php echo $naam; ?>">
<br>
akkoord <input type="checkbox" name="accepteer" value="<?php echo $accepteer; ?>">
<br> <br>
<input type="submit" value="Verzenden">
</form>
<br>
<?php
if ($naam) {
echo "hallo $naam";
} else {
echo "Vul het formulier in";
}
?>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse